import request from '@/utils/request'


// 新增结算单
export function saveStatementItem(data) {
  return request({
    url: '/business/item',
    method: 'post',
    data: data
  })
}

// 根据结算单 ID 查询结算单明细集合。
export function getStatementItemListByStatementId(statementId){
  return request({
    url: '/business/item?statementId=' + statementId,  // http://localhost/busiess/item?statementId=1
    method: 'get',
  })
}

// 支付功能
export function pay(statementId){
  return request({
    url: '/business/item/' + statementId,
    method: 'patch',
    headers:{'cmd':'pay'}
  })
}